package com.totoro.mapstruct.mapstruct_qualified.mapper;

import com.totoro.mapstruct.mapstruct_qualified.bean.GermanRelease;
import com.totoro.mapstruct.mapstruct_qualified.bean.OriginalRelease;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * Created by Niki on 2018/9/28 16:45
 */
@Mapper(uses = TitleUtil.class)
public interface MovieMapper {
    MovieMapper instance = Mappers.getMapper(MovieMapper.class);

    @Mapping(target = "title",qualifiedByName = {"TitleTranslator", "German"})
    GermanRelease toGerman(OriginalRelease release);
}
